package org.example.commerce.api.beans;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class ModifyGoodsParam {
    @NotNull(message = "商品ID不能为空")
    private Long id;

    @NotNull(message = "商品名称不能为空")
    private String name;

    @NotNull(message = "商品价格不能为空")
    private BigDecimal price;

//    @NotNull(message = "商品上架时间不能为空")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
    /**
     * 商品图片
     */
    private String imgUrl;
    /**
     * 商品分类编号
     */
    private Long categoryId;


}
